package com.mazaiting.manager.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mazaiting.mybatisplus.domain.entity.BaseUserEntity;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * <p>
 * 角色关联的权限
 * </p>
 *
 * @author mazaiting
 * @since 2022-09-12
 */
@Getter
@Setter
@TableName("sys_role_permission")
@NoArgsConstructor
public class SysRolePermission extends BaseUserEntity {

    /**
     * 主键ID
     */
    @TableId("id")
    private Long id;

    /**
     * 角色ID
     */
    @TableField("role_id")
    private Long roleId;

    /**
     * 权限ID
     */
    @TableField("permission_id")
    private Long permissionId;

    public SysRolePermission(Long roleId, Long permId) {
        this.roleId = roleId;
        this.permissionId = permId;
    }
}
